package proxy.m2;

import proxy.m1.IUserDao;
import proxy.m1.UserDao;

public class Client {
    public static void main(String[] args) {
        IUserDao target = new UserDao();
        System.out.println("目标对象信息：" + target.getClass());
        IUserDao proxy = (IUserDao) new ProxyFactory(target).getInstance();
        System.out.println("代理对象信息：" + proxy.getClass());
        proxy.save();
    }
}
